#include "PyServer.h"

int main(int argc, const char *argv[])
{
	if (argc != 2) return 0;
	using namespace boost::python;
	Py_Initialize();
	PyEval_InitThreads();
	PyEval_ReleaseThread(PyThreadState_Get());
	try{
		exec_file(argv[1]);
	}
	catch (error_already_set const &){
		printf("process python module call failed:\n");
		PyErr_Print();
	}
	catch (...){
		printf( "process python module catch ...\n");
	}
	PyGILState_Ensure();
	Py_Finalize();
	return 1;
}